
/***********************************************************************
 * Planet class
 * 
 * Implements the planet artifact
 *
 * Signature:
 *  public static Planet create (String name, Coord position);
 *  public void install ();
 *  public void destroy ();
 *  public Coord position ();
 *  public String name ();
 *  public void report (String message);
 *  public void changePosition (Coord target);
 *  public boolean isOrbitable ();
 *  public void takeDamage (int damage);
 *  public abstract char display ();
 *  public abstract String toString ();
 ***********************************************************************/

class Planet extends Artifact {

    protected Planet (String n, Coord p) {
	super(n,p);
    }

    public static Planet create (String n, Coord p) {
	Planet pl = new Planet(n,p);
	pl.install();
	return pl;
    }

    public char display () {
	return 'o';
    }

    public String toString () {
	return "Planet " + this.name() + " " + this.position().toString();
    }

    public boolean isOrbitable () {
	return true;
    }

}
